<?php
class Projectfile extends Zend_Db_Table{
    	protected $_name ="project_file";
	protected $_primary = 'file_id';

     //根据file_id 查询projectfile
    public function getprojectfileByfile_id($file_id){
          $select = $this->select();
          $select->where("file_id=".$file_id);
          return $this->fetchAll($select)->toArray();
    }

         //根据file_id 查询projectfile
    public function getprojectfileByproject_id($project_id){
          $select = $this->select();
          $select->where("project_id=".$project_id);
          return $this->fetchAll($select)->toArray();
    }
 //更新projectfile
    public function updateprojectfileByfile_id($array,$file_id){

		$db = $this->getAdapter();
		$where=$db->quoteInto('file_id = ?', $file_id);
		$this->update($array, $where);
	}
//删除projectfile
     public function delprojectfileByfile_id($file_id){
          $where = 'file_id = '. $file_id;
         $this->delete($where);
         return true;
    }
}
?>
